import tableServiceAbstract from "@/core/table/tableService.interface";
import { $roleAdminList, $roleGrant, $roleCancel } from "@/api/role/role";
export default class roleUserService implements tableServiceAbstract {
  getTable(params: any): Promise<any> {
    let mParams: { [key: string]: any, role_id: number } = { role_id: 0 };
    mParams.page = params.current;
    mParams.limit = params.pageSize;
    mParams.role_id = params.role_id;
    mParams.work_userid = params.work_userid;
    mParams.name = params.name;
    mParams.phone = params.phone;
    return $roleAdminList(mParams);
  }
  delete(params: any): Promise<any> {
    return $roleCancel(params);
  }
  add(params: any): Promise<any> {
    return $roleGrant(params);
  }
  edit(params: any): Promise<any> {
    return Promise.resolve(true);
  }
  detail(params: any): Promise<any> {
    return Promise.resolve(true);
  }
}
